//
//  QYNetManager.h
//  qianyingFM
//
//  Created by yangyang on 16/4/16.
//  Copyright © 2016年 杨阳. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "SsehPublicModel.h"

typedef void(^SuccessBlock)(id responseObject);
typedef void(^Failure)(NSError *error);

@interface QYNetManager : NSObject

@property (nonatomic,strong) AFHTTPSessionManager *afhttpManager;
/**
 *  获取网络管理的单例
 *
 */
+(instancetype)sharedManager;

@property (nonatomic,copy) void(^ErrorForTokenFailed)(void);

//post 请求
- (void)POST:(NSString*)url parameters:(id)parameters andApiTyp:(SsehApiTyp)type SuccessBlock:(SuccessBlock)block Failure:(Failure)failuerBlock;

-(void)upLoadSingeImage:(NSString *)url parameters:(id)parameters andImage:(UIImage *)image andImageName:(NSString *)nowTime SuccessBlock:(SuccessBlock)block Failure:(Failure)failuerBlock;

-(void)upLoadImageWithURL:(NSString *)url parameters:(id)parameters andImageInfoArr:(NSArray *)imageInfoArr SuccessBlock:(SuccessBlock)block Failure:(Failure)failuerBlock;

-(void)upLoadAnyImageWithURL:(NSString *)url parameters:(id)parameters andSsehPublicModel:(SsehPublicModel *)model SuccessBlock:(SuccessBlock)block Failure:(Failure)failuerBlock;

@end










